Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.9.1 vrf 20240318 contract updates #12470

Conversation

kidambisrinivas
Copy link
Collaborator

Later VRF v2.5 contract updates

jinhoonbang and others added 16 commits March 18, 2024 19:59
* make billing more flexible in VRF 2.5
	- percentage based billing
	- flat fee denominated in native

* fix linting issues

* address comments and fix failing tests

* run goimports

* fix linting issue
* VRF-329: add BHS CTF test

* VRF-329: add BHS CTF test - VRF v2 and V2Plus; Refactoring to make it a bit more DRY

* VRF-329: small refactoring

* VRF-329: fixing lint issues

* VRF-329: fixing lint issues

* VRF-329: fixing lint issues

* VRF-329: fixing lint issues

* VRF-329: fixing lint issues

* VRF-329: trying to remove flakiness
* VRF V2.5 gas optimisations

* Minor changes

* Removed changes in SubscriptionAPI.sol due to no actual gain in hot paths

* Minor changes
* Optimize deregisterProvingKey

* Optimize fulfillRandomWords

* Optimize deregisterMigratableCoordinator

* Optimize _isTargetRegistered

* Optimize pendingRequestExists

* Optimize _deleteSubscription

* Optimize getActiveSubscriptionIds

* Optimize requestRandomWords

* Replace post-increment with pre-increment

* Optimize _getFeedData

* Optimize ownerCancelSubscription

* Optimize getSubscription

* Optimize createSubscription

* Optimize requestSubscriptionOwnerTransfer

* Optimize acceptSubscriptionOwnerTransfer

* Optimize addConsumer

* Update geth wrappers

* Remove proving keys length check in pendingRequestExists
* allow 0 confirmation delays in VRF; use pending block for simulation in VRF

* fix script build error

* fix failing automation test

* fix more tests

* integraiton test wip

* add integration tests for pending simulation block and zero confirmation delay (only v2 plus) and add simulation block option to superscript

* Update core/chains/evm/client/simulated_backend_client.go

Co-authored-by: Chris Cushman <104409744+vreff@users.noreply.github.com>

* use pendingContractCall instead of low-level call contract

* fix eth_call_test.go

* handle nil gas and gasPrice in backend test client for estimateGas

---------

Co-authored-by: Ilja Pavlovs <ilja.pavlovs@gmail.com>
Co-authored-by: Chris Cushman <104409744+vreff@users.noreply.github.com>
* Add native payment to RandomWordsFulfilled event

* Minor change

---------

Co-authored-by: Sri Kidambi <1702865+kidambisrinivas@users.noreply.github.com>
#11991)

* VRF-881: fixed toml config for VRF Load tests; VRF-882: add more customisation options for BHS job in super scripts

* VRF-881: fixing lint

* VRF-881: upgrading ctf library

* VRF-881: adding load test metric calculation in seconds for VRF V2Plus Consumer contract; adding more parametrization options in setup-env script

* VRF-881: PR comments;

* VRF-881: fixing Lint issues

* VRF-881: fixing BHS tests

* VRF-881: adding smoke test type

* VRF-881: PR comments

* VRF-881: fixing load test

* VRF-881: fixing config

* VRF-881: fixing e2e tests

* VRF-881: fixing sonar

* VRF-881: fixing sonar and refactoring

* VRF-881: fixing lint issues
* Lint warning fixes

* Update go wrappers

* Prettier fix
* fulfillRandomWords msg.data length validation

* Addressed PR comments

* Added changeset
* fulfillRandomWords msg.data length validation

* Addressed PR comments

* Validate if flat fee configs are configured correctly

* Update flat fee discount check

* Allow fulfillmentFlatFeeLinkDiscountPPM to be equal to fulfillmentFlatFeeNativePPM

* Added changeset

* Update VRFV2Plus test

* Remove arbitrary bounds

* Remove unused error
* Explicit bounds for premium config params in VRFCoordinatorV2_5

* setConfig method will revert if premium percentages are above 100
* added unit tests for coverage

* Generated Go wrappers and executed prettier tool

* Added constants for percentage bounds and changed revert error

* Removed min boundary

* Added changeset

* Changed upper premium percentage boundary to 155
…ative (#12369)

* Remove amount from withdraw and withdraw native

* Fix Go script
* Emit events for vrf v2plus state changing functions

* Emit FallbackWeiPerUnitLinkUsed event if the fallback is used in _getFeedData

* Add missing tests

* Refactor _getFeedData to return isFeedStale instead of emitting event

* Add enable, disable, and withdrawn events to VRFV2PlusWrapper

* Fix solhint and prettier

* Remove isFeedStale from VRFV2WrapperConsumerBase

* Update Solidity wrappers
…IP (#12405)

* soft delete nonce in s_consumers so that request IDs do not repeat. WIP

* forge unit tests passing except for exact billing amount

* add forge tests and optimize gas

* regenerate wrappers

* remove comment

* address comments

* fix test

* add changeset
* soft delete nonce in s_consumers so that request IDs do not repeat. WIP

* forge unit tests passing except for exact billing amount

* add forge tests and optimize gas

* regenerate wrappers

* remove comment

* address comments

* fix test

* add changeset

* implement pending request counter
pending request counter in vrf v2.5 coordinator

* run prettier and regenerate wrappers

* add changeset

* bump gas required for remove consumer
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

* Update Operator UI from v0.8.0-8da47c3 to v0.8.0-a2b54a2

* Sig scanner check

* Add web assets

---------

Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
Co-authored-by: george-dorin <george.dorin@smartcontract.com>
@kidambisrinivas
Copy link
Collaborator Author

Replaced by #12476

@kidambisrinivas kidambisrinivas deleted the release-2.9.1-vrf-20240318-contract-updates branch March 18, 2024 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants